←Select platform

AddOrGetExisting<T>(CacheItem<T>,CacheItemPolicy) Method

Summary

Adds a cache entry into the cache, and returns an existing cache entry with a matching key.

Syntax
C#
C++/CLI
Java
Python
public abstract CacheItem<T> AddOrGetExisting<T>( 
   CacheItem<T> item, 
   CacheItemPolicy policy 
) 
public:  
   generic<typename T> 
   virtual CacheItem<T>^ AddOrGetExisting( 
      CacheItem<T>^ item, 
      CacheItemPolicy^ policy 
   ) abstract 
public abstract<T> CacheItem<T> addOrGetExisting(CacheItem<T> value, Class<?> classOfT, CacheItemPolicy policy) 
def AddOrGetExisting(self,T> item,policy): 

Parameters

item

Cache item to add.

policy

Expiration policy for the item.

Return Value

The previous cache entry that matches the specified key, if found. If the cache contains an item with the same key, then it will be returned before it is overwritten. Otherwise, null.

Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Caching Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.